#ifndef IMPORTDATADIALOG_H
#define IMPORTDATADIALOG_H

#include <QtGui/QWidget>
#include <QTreeWidgetItem>
#include <QDate>
#include <QTime>
#include <QString>
#include <QFile>
#include <QTextStream>
#include <QFileDialog>
#include <QDialog>

#include "SQLiteDB.h"
#include "ui_ImportDataDialog.h"

class ImportDataDialog : public QDialog
{
    Q_OBJECT

public:
    ImportDataDialog(QDialog *parent = 0);
    ~ImportDataDialog();

    void setImportColumnList();
    //void updateDB(QStringList& colNames, QVector<QStringList>& valVec);

public slots:
	void showThisDialog();
	void selectImportFile();
	void itemClicked(QTreeWidgetItem*, int);
	void import();

private:
    Ui::ImportDataDialogClass ui;
    QVector<QString> mTableNames;
    QString mImportFileName;
	//QString mDefaultSaveFile;
	bool mNeedInit;
	map<QString, QStringList> mColNames; //map<tableName, colNames>
	map<QString, QVector<QStringList> > mValVec; //map<tableName, valueVector>
};

#endif // IMPORTDATADIALOG_H
